Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clean cloned repository before checkout #551

Merged
merged 2 commits into from
Aug 30, 2024
Merged

fix: clean cloned repository before checkout #551

merged 2 commits into from
Aug 30, 2024

Conversation

skjnldsv
Copy link
Member

Signed-off-by: John Molakvoæ (skjnldsv) [email protected]

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Comment on lines +73 to +75
// reset and clean the repo
await git.raw(['reset', '--hard', `origin/${branch}`])
await git.raw(['clean', '--force', '-dfx'])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the important part. We make sure there is no pending changes before checking out the target branch
I checked the cached repo, it's on master, pulled on latest HEAD and with a clean state 🤨 ...

I don't get how the git fetch and pull --prune could put the repo in a conflicting state

@skjnldsv skjnldsv self-assigned this Aug 30, 2024
@skjnldsv skjnldsv added bug Something isn't working 3. to review labels Aug 30, 2024
@skjnldsv skjnldsv merged commit b6b44b8 into master Aug 30, 2024
8 checks passed
@skjnldsv skjnldsv deleted the fix/clean branch August 30, 2024 07:56
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes (mostly) sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants